from selenium.webdriver.common.by import By
from unit_17.Page.Page_login import Page_login

class Page2(Page_login):
    # 鼠标悬停 我的酒仙
    my_jiuxian_loc=(By.XPATH, '/html/body/div[2]/div/div[2]/ul/li[1]/div[1]/a')
    def my_jiuxian(self):
        self.move_to(self.my_jiuxian_loc)

    # 点击 我的订单
    my_order_loc=(By.XPATH, '/html/body/div[2]/div/div[2]/ul/li[1]/div[2]/a[1]')
    def my_order(self):
        self.click(self.my_order_loc)

    # 点击 基本信息
    jiben_info_loc=(By.LINK_TEXT, '基本信息')
    def jiben_info(self):
        self.click(self.jiben_info_loc)

    # 下拉列表-省
    province_loc=(By.ID, 'province')
    def select_province(self):
        self.select_index(self.province_loc, 1)

    # 下拉列表-市
    city_loc=(By.ID, 'city')
    def select_city(self):
        self.select_value(self.city_loc, '52')

    # 下拉列表-区
    district_loc=(By.ID, 'district')
    def select_district(self):
        self.select_text(self.district_loc, '昌平区')

    # 下拉列表-街道
    street_loc=(By.ID, 'street')
    def select_street(self):
        self.select_value(self.street_loc, '35620')

    # 点击 提交按钮
    tijiao_btn_loc=(By.CLASS_NAME, 'submitZpInfo')
    def tijiao_btn(self):
        self.click(self.tijiao_btn_loc)

